<template>
<div>
  <table>
    <tr>
      <td >
        厂牌型号：<input type="text" v-model="form.brandmodel" /></td>
      <td>车牌号：<input type="text" v-model="form.licenseplatenumber" /></td>
    </tr>
      <tr>
      <td>司机名称：<input type="text" v-model="form.driversname" /></td>
      <td>所属公司：<input type="text" v-model="form.company" /></td>
    </tr>
      <tr>
      <td>车型：<input type="text" v-model="form.model" /></td>
      <td>车辆颜色：<input type="text" v-model="form.vehiclecolor" /></td>
    </tr>
      <tr>
      <td>购置日期：<input type="date" v-model="form.purchasedate" /></td>
      <td>运营证号：<input type="text" v-model="form.operationcertificatenumber" /></td>
    </tr>
      <tr>
      <td>保险到期日期：<input type="date" v-model="form.insuranceexpirationtime" /></td>
      <td>年检到期日期：<input type="date" v-model="form.annualInspectionexpirationtime" /></td>
    </tr>
      <tr>
      <td>保养公里数：<input type="text" v-model="form.maintenancekilometersettings" /></td> 
    </tr>
      <tr> 
<td>
  车辆照片：<input type="text" v-model="form.vehiclephotos">
</td>
    </tr>

      <tr> 
        <td>
          保险卡照片：<input type="text" v-model="form.insuranceCardPhotos">
        </td>
    </tr>
      <tr>
      <td><input type="button" @click="tianjia()" value="修改" /></td>

    </tr>
  </table>
</div>
</template>


<script>
  export default {
    data () {
      return {
        radio: '1',
              form:{

      brandmodel: "",
      licenseplatenumber: "",
      driversname: "",
      company: "",
      model: "",
      vehiclecolor: "",
      purchasedate: "",
      operationcertificatenumber: "",
      insuranceexpirationtime: "",
      annualInspectionexpirationtime: "",
      maintenancekilometersettings: "",
      vehiclephotos: "",
      insuranceCardPhotos: "",
      zhuangtai: 1,
      id: '',
      }
      };
    },
    created(){
this.xinashishow();
    },
    methods:{
        xinashishow() { 
      var id=  localStorage.getItem("saihfkns");
   this.$http.get("https://localhost:44357/WeatherForecast/CheLiangGuanLiFanTian?id="+id).then(a=>{
debugger
     this.form=a.data.data[0];

   })
    },
     tianjia(){
   this.$http.post('https://localhost:44357/WeatherForecast/Cheliangupdate',this.form).then(a=>{
     if(a.data.code==200)
     {
       alert(a.data.mess);
       this.$router.push("/CheLiangXianShi")
     }
     else
     {
        alert(a.data.mess);
     }
    
   })
  }
    }
  }
</script>
 